<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户地址</title> <#include "/WEB-INF/content/module-index.html">
<script type="text/javascript">
function typeFormatter(value,rowData,rowIndex){
	if(value==0){
		return "支出";
	}else
		return "收入";
}
$(function(){
	$("#search").click(function(){
		var uid=$("#uid").val();
		$("#grid").datagrid("reload",{"uid":uid});		
	});	
	$("#clear").click(function(){
		$("#uid").val("");
	});
});
</script>
<style>
a.btn-border{
	border: 1px solid #ccc;
}
</style>
</head>
<body>
<body class="easyui-layout">
	<div region="center" style="padding: 5px; background:#eee;">
		<div id="toolbar">
			<label>用户名:</label><input id="uid"/>
			<a id="search" class="easyui-linkbutton" icon="icon-search" style="border: 1px solid #ccc" plain="true">搜索</a>
			<a id="clear" class="easyui-linkbutton" icon="icon-no" style="border: 1px solid #ccc" plain="true">清空</a><br/>
			<@auth code="user:dollar:new">
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-add" style="border: 1px solid #ccc" onclick="javascript:add()">赠送/扣款</a>
			</@auth>
		</div>
		<table id="grid" class="easyui-datagrid" url="query" align="center" idField="uaid" rownumbers="true" striped="true" fitColumns="true" fit="true" pagination="true" singleSelect="true" toolbar="#toolbar">
			<thead>
				<tr>
					<th field="uid" width="50">用户名</th>
					<th field="amount" width="20">账户变化情况</th>
					<th field="items" width="20">名目</th>
					<th field="logtype" width="20" formatter="typeFormatter">类型</th>
					<th field="createtime" width="30" align='center'>创建时间</th>
				</tr>
			</thead>
		</table>
	</div>
</body>
</body>

</html>